package com.shun.media;

import com.shun.common.utils.ShunEnvUtil;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment;

/**
 * 媒体中心服务
 * @author clever
 * @since 2021-10-18
 */
@Slf4j
@SpringBootApplication(scanBasePackages = "com.shun")
@MapperScan("com.shun.media.mapper")
public class GjydApp {

    public static void main(String[] args) {
        log.debug("启动GJYD微服务...");
        SpringApplication gjydApp = new SpringApplication(GjydApp.class);
        gjydApp.setBannerMode(Banner.Mode.OFF);
        ApplicationContext context = gjydApp.run(args);
        Environment env = context.getEnvironment();
        log.info("启动微服务成功，微服务名称：{},启动端口:{}", ShunEnvUtil.getApplicationName(env), ShunEnvUtil.getServerPort(env));
    }
}
